package com.vue.power.backend.sys.entity;

import com.vue.power.backend.common.base.entity.QueryBase;
import com.vue.power.backend.config.uuid.UUIdGenId;
import com.vue.power.backend.sys.dto.RoleTreeDto;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

@Table(name = "t_role")
public class UserRole extends QueryBase {

    // 角色唯一标识
    @Id
    @Column(name = "roleId")
    @KeySql(genId = UUIdGenId.class)
    private String roleId;
    // 角色名字
    @Column(name = "roleName")
    private String roleName;
    // 角色编码
    @Column(name = "roleCode")
    private String roleCode;
    // 创建时间
    @Column(name = "crtDate")
    private Long crtDate;
    // 创建人唯一标识
    @Column(name = "crtUserId")
    private String crtUserId;
    // 创建人
    @Column(name = "crtUser")
    private String crtUser;
    // 当前角色底下的所有的菜单权限节点信息
    @Transient
    private List<RoleTreeDto> roleTrees;

    public List<RoleTreeDto> getRoleTrees() {
        return roleTrees;
    }

    public void setRoleTrees(List<RoleTreeDto> roleTrees) {
        this.roleTrees = roleTrees;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public Long getCrtDate() {
        return crtDate;
    }

    public void setCrtDate(Long crtDate) {
        this.crtDate = crtDate;
    }

    public String getCrtUserId() {
        return crtUserId;
    }

    public void setCrtUserId(String crtUserId) {
        this.crtUserId = crtUserId;
    }

    public String getCrtUser() {
        return crtUser;
    }

    public void setCrtUser(String crtUser) {
        this.crtUser = crtUser;
    }
}
